1. Field of the Invention
A certain aspect of the present invention relates to an image scanning device and an image forming apparatus including the image scanning device.
2. Description of the Related Art
In a typical optical image scanning device, a document placed on a contact glass used as a document table is illuminated and light reflected from the document is detected by a CCD image sensor.
Normally, scanning parameters such as a linear scanning speed and a scanning distance are determined based on settings such as a document size, a resize ratio, and a scan density. Those settings are preferably performed automatically by the image scanning device rather than manually by the user to improve user convenience and to prevent setting errors.
For example, patent document 1 discloses a method for automatically detecting a document size. In the disclosed method, the size in the main-scanning direction of a document is determined based on image data obtained by a CCD image sensor and the size in the sub-scanning direction is determined based on an output from a document detection sensor.
Also, patent document 2 discloses an image scanning device that detects opening and closing of a document pressing unit and causes a scanning unit to detect the size of a document if the document pressing unit is being closed. This configuration makes it possible to detect a document size at an appropriate timing according to user operations.    [Patent document 1] Japanese Patent No. 3168666    [Patent document 2] Japanese Patent Application Publication No. 2006-254182
However, the related art technologies described above have some disadvantages. For example, there is a case where a document size detection process is not completed while the document pressing unit is being closed and the back surface of the document pressing unit is mistakenly detected as a document even if no document is placed on the document table. This problem may be solved, for example, by providing, in addition to an open/close detection unit for detecting opening and closing of the document pressing unit, a sensor for detecting that the document pressing unit has entered a document detection range of the CCD image sensor. When the document pressing unit is out of the document detection range, the CCD image sensor does not mistakenly detect the back surface of the document pressing unit as a document. However, this configuration increases the costs of an image scanning device.